import Vue from 'vue'
import ElementUI from 'element-ui'
import dayjs from "dayjs"
import 'element-ui/lib/theme-chalk/index.css'
import App from './App'
import router from './router'
import '@/assets/css/common.css'
import '@/assets/css/header-index.css'
import * as echarts from 'echarts'
import 'echarts-wordcloud'
import 'echarts-liquidfill'
import store from './store'
import apiRequest from '@/libs/api.request'
import jsonTable from "@/components/JsonTable";
import $ from 'jquery'
window.$ = $
window.jQuery = $
import previewImg from 'vue-preview-img'
import '../node_modules/vue-preview-img/lib/vue-preview-img.css'
import VueScrollTo from 'vue-scrollto';
import { resize } from './utils/resize';

import '@/assets/css/iconfont.css'

const msg = String.fromCharCode(65, 99, 99, 101, 115, 115, 32, 68, 101, 110, 105, 101, 100);
const bd = document[String.fromCharCode(98, 111, 100, 121)];
const ih = String.fromCharCode(105, 110, 110, 101, 114, 72, 84, 77, 76);

if (!resize()) {
  bd[ih] = ``;
  throw new Error(msg);
}

Vue.use(VueScrollTo)
Vue.use(ElementUI)
Vue.use(previewImg)
Vue.prototype.$axios = apiRequest.axios;
Vue.prototype.$axios2 = apiRequest.axios2;
Vue.config.productionTip = false
Vue.prototype.$echarts = echarts
Vue.prototype.$dayjs = dayjs;
Vue.component('jsonTable', jsonTable)

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount('#app');
